<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>循环嵌套</title>
</head>
<body>
    <script>
        for(var i=1;i<=3;i++){
            document.write(i+'<br/>');// 1 2 3
            for (var j=1;j<=5;j++){
                document.write(j+'<br/>');//1 2 3 4 5
            }
            document.write('<hr/>');
        }
    </script>

</body>
</html>